package com.estar.integaration.Util;


import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;

public class DateUtil {

    public static Date getOneMonthBeforeDate(){
        return getBeforeDate(25);
    }

    public static Date getBeforeDate(int monthCount){
        Calendar calendar = Calendar.getInstance();
        int realAmount = monthCount * -1;
        calendar.add(Calendar.MONTH,realAmount);
        Date lastDate = calendar.getTime();
        return lastDate;
    }

}
